<template>
  <div>
    <common-return :head="$route.query.sys_name" :path="path"></common-return>
    <completion></completion>
    <van-collapse v-model="activeName" accordion>
      <van-collapse-item title="候选人名单" name="1">
        <final-score :candidStatus="candidStatus"></final-score>
      </van-collapse-item>
      <van-collapse-item title="添加候选人" name="2">
        <add-candidates @CandidStatus="CandidChild($event)"></add-candidates>
      </van-collapse-item>
      <van-collapse-item title="删除候选人" name="3">
        <del-candidates @CandidStatus="CandidChild($event)"></del-candidates>
      </van-collapse-item>
      <van-collapse-item title="细则" name="4">
        <rules :btmStatus="ruleStatus"></rules>
      </van-collapse-item>
      <van-collapse-item title="添加细则" name="5">
        <add-rules @RuleStatus="RuleChild($event)"></add-rules>
      </van-collapse-item>
    </van-collapse>
  </div>
</template>

<script>
  import CommonReturn from "@/components/Common/CommonReturn"
  import FinalScore from "../Score/FinalScore";
  import Completion from "../Score/Completion";
  import AddCandidates from "../Score/AddCandidates";
  import AddRules from "../Score/AddRules";
  import Rules from "../Score/Rules";
  import DelCandidates from "../Score/DelCandidates";
  import {Collapse, CollapseItem} from 'vant';

  export default {
    name: "DocumentScore",
    components: {
      DelCandidates,
      CommonReturn,
      FinalScore,
      Completion,
      AddCandidates,
      AddRules,
      Rules,
      [Collapse.name]: Collapse,
      [CollapseItem.name]: CollapseItem,
    },
    data() {
      return {
        activeName: '1',
        path: "/Documents",
        candidStatus: "",
        ruleStatus: ""
      }
    },
    methods:{
      CandidChild:function(msg){
        let _this = this;
        _this.candidStatus = msg;
      },
      RuleChild:function(msg){
        let _this = this;
        _this.ruleStatus = msg;
      }
    }
  }
</script>

<style scoped>

</style>
